package com.pcbly.web.action.system;

import java.util.List;

import com.pcbly.web.action.BaseAction;
import com.pcbly.web.bean.system.ConfigBean;
import com.pcbly.web.business.config.ConfigService;

public class ConfigAction extends BaseAction<ConfigBean> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7752422373501394277L;
	protected ConfigService configService;
	ConfigBean configBean;
	List<ConfigBean> configBeans;

	public String view() throws Exception {

		configBean = configService.get(super.getId());
		return super.view();
	}

	public String save() throws Exception {

		return super.save();
	}

	public String index() throws Exception {
		configBeans = configService.findConfigs();
		return super.index();
	}

	public String delete() throws Exception {
		configService.removeById(getId());
		return super.delete();
	}

	public List<ConfigBean> getConfigBeans() {
		return configBeans;
	}

	public void setConfigBeans(List<ConfigBean> configBeans) {
		this.configBeans = configBeans;
	}

	public ConfigBean getConfigBean() {
		return configBean;
	}

	public void setConfigBean(ConfigBean configBean) {
		this.configBean = configBean;
	}

	public void setConfigService(ConfigService configService) {
		this.configService = configService;
	}
}
